package com.david.zhufengfm.entity.discoverrecommend;

import org.json.JSONException;
import org.json.JSONObject;

/**
 * Created by David on 2015/10/22.
 * qq:978944820
 */
public class FocusRecommend {

    /**
     * id : 3597
     * shortTitle : 中国每天2亿人乘电梯，安全吗？
     * longTitle : 中国每天2亿人乘电梯，安全吗？
     * pic : http://fdfs.xmcdn.com/group15/M06/52/77/wKgDaFW16vfD9nFSAAHBRSk6xm4459_android_large.jpg
     * type : 2
     * uid : 30495264
     * albumId : 2814299
     * isShare : false
     * is_External_url : false
     */

    private long id;
    private String shortTitle;
    private String longTitle;
    private String pic;
    private long type;
    private long uid;
    private long trackId;
    private long specialId;
    private long albumId;
    private boolean isShare;
    private boolean is_External_url;

    public void parseJSON(JSONObject json){

        if (json != null) {
            try {
                id=json.getLong("id");
                shortTitle=json.getString("shortTitle");
                longTitle=json.getString("longTitle");
                pic=json.getString("pic");
                type=json.getLong("type");
                uid=json.optLong("uid");
                trackId=json.optLong("trackId");
                specialId=json.optLong("specialId");
                albumId=json.optLong("albumId");
                isShare=json.getBoolean("isShare");
                is_External_url=json.getBoolean("is_External_url");

            } catch (JSONException e) {
                e.printStackTrace();
            }
        }
    }

    public long getId() {
        return id;
    }

    public String getShortTitle() {
        return shortTitle;
    }

    public String getLongTitle() {
        return longTitle;
    }

    public String getPic() {
        return pic;
    }

    public long getType() {
        return type;
    }

    public long getUid() {
        return uid;
    }

    public long getAlbumId() {
        return albumId;
    }

    public boolean isShare() {
        return isShare;
    }

    public boolean is_External_url() {
        return is_External_url;
    }

    public long getTrackId() {
        return trackId;
    }

    public long getSpecialId() {
        return specialId;
    }
}
